package com.baosight.risk.api.zbaa;

import com.baosight.risk.base.service.BaseService;
import com.baosight.risk.service.xtaa.code.vo.PersonTargetTreeVO;
import com.baosight.risk.service.xtzy.entity.XtzyCompany;
import com.baosight.risk.service.xtzy.entity.XtzyUser;
import com.baosight.risk.service.zbaa.entity.ZbaaTarget;
import com.baosight.risk.service.zbaa.entity.ZbaaTargetSend;
import com.baosight.risk.service.zbaa.entity.ZbaaTargetValue;
import com.baosight.risk.service.zbaa.vo.TargetVO;
import com.baosight.risk.service.zbaa.vo.ZbaaTargetHomeIndexVO;
import com.baosight.risk.service.zbaa.vo.ZbaaTargetVO;
import com.baosight.risk.service.zbaa.vo.ZbaaTargetValueVO;
import net.sf.json.JSONObject;

import java.util.List;
import java.util.Map;

public interface IZbaaTargetService extends BaseService<ZbaaTarget> {

    ZbaaTarget getTargetByTargetNo(String targetNo);

    List<ZbaaTarget> getTargetList(ZbaaTarget target);

    Integer insertTarget(ZbaaTargetVO targetVO);

    Integer updateTarget(ZbaaTargetVO targetVO);

    ZbaaTargetVO getById(String id);

    List<ZbaaTarget> getTargetListByUser(XtzyUser user, String targetName);

    String addOrder(ZbaaTargetSend targetSend, XtzyUser user);

    Integer deleteOrder(List<String> ids);

    List<ZbaaTarget> getTargetByIds(List<String> ids);

    List<ZbaaTarget> getTargetListByTagertTypes(ZbaaTarget target, List<String> types, XtzyUser user);

    Integer updateStatus(List<String> ids, String status, String statusName);

    Integer externalInterface() throws Exception;

    List<TargetVO> getHistory(List<String> targetIds, Integer count);

    List<ZbaaTargetValueVO> getValue(String targetNo, List<String> compCode, String startTime, String endTime, String period);

    List<ZbaaTargetValueVO> getHomeValue(String targetNo, List<String> compCode, String startTime, String endTime, String period);

    String getTargetValue(String targetNo, String compCode);

    String getReferenceValue(String targetNo, String compCode, String acctYear, String quarterCode);

    Integer updateReferenceValue(String targetNo, String targetName, String compCode, String acctYear, String quarterCode,String targetValue);

    ZbaaTargetValue getLastZbaaTargetInfo(String targetNo, String compCode);

    void calculateTarget(String satrtDate, String endDate) throws Exception;

    void calculateTargetByTask(String params, String jobId) throws Exception;

    List<XtzyCompany> getXtzyCompanyByTargetNo(String targetNo);

    List<ZbaaTarget> getTargetListByTagertTypesAndUserComp(ZbaaTarget target, List<String> ddCodeList, XtzyUser user);

    List<ZbaaTargetHomeIndexVO> getHomeIndex();

    JSONObject getHomeIndexStatus();

    JSONObject getHomeIndexStatusFromPython(String params, String jobId) throws Exception;

    List<List<ZbaaTargetValueVO>> getHomeIndexDataList();

    JSONObject getAnaylzeResult(Map<String, Object> maps);

    List<ZbaaTarget> getTargetListByRiskSource(String riskSource);

    void getUpdateActualValueTarget();

    List<PersonTargetTreeVO> getTargetTree(String queryFlag);

    List<ZbaaTarget> getRiskWarningStatusTargetList(ZbaaTarget target);
}
